var stageTemplate = `
<div class="weui-cells">
    <div class="weui-cell" v-for="eObject in credit">
        <div class="weui-cell__hd"><img src="" alt="" style="width:20px;margin-right:5px;display:block"></div>
        <div class="weui-cell__bd">
            <p class="number">{{ eObject.total }}</p>
            <p class="cell_explain">本金：<span class="number">{{ eObject.principal }}</span> + 手续费：<span class="number">{{ eObject.brokerage }}</span></p>
        </div>
        <div class="weui-cell__ft">
        <p>第<span class="number">{{ eObject.stageNum }}</span>期</p>
        <p><span class="number">{{ eObject.repayDate }}</span></p>
        </div>
    </div>
</div>
`;

function getRepayCells(repayData) {

    return {
        template: stageTemplate,
       
        computed: {
            
        },
        methods: {

        },
        props:['credit'],
        mounted:function  () {
            setRepayBoxHeight();
        }
    };
}

// 设置还款列表的父元素高度
function setRepayBoxHeight() {
    var wh = window.innerHeight;
    var rbh = (wh - 189 -101 -46-60)+"px";
    $("#repay_box").css("height",rbh);
}

module.exports = {
    getRepayCells: getRepayCells
}